package com.tedu.util.response;

import lombok.Data;
/**
 * @date 2023/4/19
 * @author liuhuan
 */
@Data
public class ResultVo {
    private int code;
    private String msg;
    private Object data;

    public ResultVo(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public ResultVo(Object data) {
        this.code= AppCode.SUCCESS.getCode();
        this.msg= AppCode.SUCCESS.getMsg();
        this.data = data;
    }

    public ResultVo(AppCode appCode, Object data) {
        this.code= appCode.getCode();
        this.msg= appCode.getMsg();
        this.data = data;
    }

    public ResultVo(AppCode appCode) {
        this.code= appCode.getCode();

    }
}
